﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" Theme="Default_Themes" AutoEventWireup="true" CodeFile="DSDoanVienBiXoa.aspx.cs" Inherits="DanhMuc_DSDoanVienBiXoa" EnableEventValidation="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="udt" runat="server">
        <ContentTemplate>
            <div class="row-fluid">
                <div class="span12">
                    <div class="box" style="border:1px solid #B6D1F2;">
                        <div class="box-title">
                            <h3><i class="icon-table"></i>Danh sách đoàn viên bị xóa: <%=st %></h3>
                            <div class="box-tool">
                                <a data-action="collapse" href="#"><i class="icon-chevron-up"></i></a>
                                <a data-action="close" href="#"><i class="icon-remove"></i></a>
                            </div>
                        </div>
                        <div class="box-content">
                            <div class="btn-toolbar pull-right clearfix">
                                <div class="btn-group">
                                    <asp:Button ID="Btn_khoiphucdoanvien" OnClientClick="return confirm('Đoàn viên sẽ được phục hồi về chi đoàn cũ?')" class="btn btn-info " runat="server" Text="Phục hồi" OnClick="Btn_khoiphucdoanvien_Click" Width="103px" />&nbsp;&nbsp;
                                    <asp:Button ID="Btn_xoadoanvien" OnClientClick="return confirm('Bạn có chắc xóa không? Nếu xóa thì tất cả thông tin liên quan (cơ sở đoàn, đoàn viên sẽ bị xóa theo!)')" class="btn btn-danger" runat="server" Text="Xóa" OnClick="Btn_xoadoanvien_Click" Width="81px" />&nbsp;&nbsp;
                                    <asp:Button ID="Btn_xuatfile" class="btn btn-inverse  " runat="server" Text="Xuất file Excel" OnClick="Btn_xuatfile_Click" Width="112px" />
                                </div>
                            </div>
                            <div class="clearfix"></div>
                            <div id="Div1" class="dataTables_wrapper form-inline" role="grid">
                                <div class="row-fluid">
                                    <div id="dvScreenWidth" visible="false"></div> <!--Thanh cuon ngang-->
                                    <div class="GridDock" id="dvGridWidth"> <!--Thanh cuon ngang-->
                                    <asp:GridView ID="Grid_DSDV_Xoa" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" Width="100%" CellPadding="5" ForeColor="#333333" GridLines="None" Style="margin-top: 0px" CellSpacing="1" DataKeyNames="MaDoanVien" OnRowDeleting="Grid_DSDV_Xoa_RowDeleting" OnRowUpdating="Grid_DSDV_Xoa_RowUpdating" BorderStyle="Solid" BorderWidth="1px" OnRowDataBound="Grid_DSDV_Xoa_RowDataBound">
                                        <AlternatingRowStyle BackColor="White" />
                                        <Columns>
                                            <asp:TemplateField HeaderText="Chọn ">
                                                <HeaderTemplate>
                                                    <asp:CheckBox ID="chkselectAll" OnCheckedChanged="chkInGridviewHeader_CheckedChanged" runat="server" AutoPostBack="true" />
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="chkchon" Enabled="true" Checked="false" runat="server" />
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Mã Đoàn Viên">
                                                <ItemTemplate>
                                                    <a href="JavaScript:newPopup('/DanhMuc/LichSuDoanVien.aspx?id=<%#_se.Encrypt(Eval("MaDoanVien").ToString(),"gold",128)%>');">
                                                      <asp:Label runat="server" ID="lblMaDoanVien" Text='<%#Eval("MaDoanVien") %>'></asp:Label>
                                                    </a>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Số Thẻ Đoàn">
                                                <ItemTemplate>
                                                    <%#Eval("SoTheDoan") %>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Tên đoàn viên">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblTenDoanVien" runat="server" Text='<%#Eval("TenDoanVien") %>'></asp:Label>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Phái">
                                                <ItemTemplate>
                                                    <%#Eval("Phai") %>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Ngày sinh">
                                                <ItemTemplate>
                                                    <%#Eval("NgaySinh") %>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="CMND">
                                                <ItemTemplate>
                                                    <%#Eval("CMND") %>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Trạng Thái" Visible="False"> 
                                                <ItemTemplate>
                                                    <asp:Label ID="lbltrangthai" runat="server" Text=' <%#Eval("TrangThai") %>'></asp:Label>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Phục Hồi">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="LinkButtonPhucHoi" runat="server" CausesValidation="false" CommandName="Update"
                                                        Text="<i class='icon-ok green'></i> Phục hồi" OnClientClick="return confirm('Phục hồi đoàn viên về chi đoàn cũ!')"></asp:LinkButton>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Xóa">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="LinkButtonxoa" runat="server" CausesValidation="false" CommandName="Delete" Text="<i class='icon-remove red'></i> Xóa" OnClientClick="return confirm('Bạn có chắc xóa không? Nếu xóa thì tất cả thông tin liên quan (cơ sở đoàn, đoàn viên sẽ bị xóa theo!)')"></asp:LinkButton>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:TemplateField>

                                            <asp:BoundField HeaderText="Trạng thái">
                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="68px" />
                                            </asp:BoundField>

                                        </Columns>
                                        <EditRowStyle BackColor="#2461BF" />
                                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                        <RowStyle BackColor="#EFF3FB" />
                                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                                        <SortedDescendingHeaderStyle BackColor="#4870BE" />
                                    </asp:GridView>
                                    </div>
                                    <div class="" style="float: right; display: inline-block; width: auto; margin-top: 10px;">

                                        <asp:LinkButton ID="btn_LocXemTatCa" runat="server" Text="<button class='btn btn-circle btn-inverse  show-tooltip' data-original-title='Xem tất cả đoàn viên bị xóa'><i class='icon-home'></i></button> Tất cả đoàn viên" ForeColor="#444444" OnClick="btn_LocXemTatCa_Click"></asp:LinkButton>&nbsp; &nbsp;
                                 <asp:LinkButton ID="btn_LocDoanVien" runat="server" Text="<button class='btn btn-circle btn-success show-tooltip' data-original-title='Lọc Đoàn viên'><i class='icon-user'></i></button> Đoàn viên" ForeColor="#11943F" OnClick="btn_LocDoanVien_Click"></asp:LinkButton>
                                        &nbsp; &nbsp;
                                 <asp:LinkButton ID="btn_LocDoanVienTruongThanh" runat="server" Text="<button class='btn btn-circle  btn-primary show-tooltip' data-original-title='Lọc Đoàn viên trưởng thành'><i class= 'icon-star '></i></button> Đoàn viên trưởng thành" ForeColor="#0090FF" OnClick="btn_LocDoanVienTruongThanh_Click"></asp:LinkButton>
                                        &nbsp; &nbsp;
                                 <asp:LinkButton ID="btn_LocDoanVienDuBi" runat="server" Text="<button class='btn btn-circle btn-warning  show-tooltip' data-original-title='Lọc Đoàn viên dự bị'><i class='icon-bookmark-empty'></i></button> Đoàn viên dự bị" ForeColor="#FE6C14" OnClick="btn_LocDoanVienDuBi_Click"></asp:LinkButton>
                                        &nbsp; &nbsp;
                                 <asp:LinkButton ID="btn_LocDoanVienKhaiTru" runat="server" Text="<button class='btn btn-circle btn-danger  show-tooltip' data-original-title='Lọc Đoàn viên bị khai trừ'><i class='icon-cut'></i></button> Đoàn viên bị khai trừ" ForeColor="#FB3838" OnClick="btn_LocDoanVienKhaiTru_Click"></asp:LinkButton>
                                    </div>


                                </div>
                            </div>
                        </div>
                    </div>

                </div>

            </div>

        </ContentTemplate>

        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="Btn_khoiphucdoanvien" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="Btn_xoadoanvien" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="Btn_khoiphucdoanvien" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="Btn_xuatfile" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
   
   <asp:UpdateProgress ID="udtprogress" runat="server" AssociatedUpdatePanelID="udt">
        <ProgressTemplate>
            <div class="progress">
                <img src="../img/ajax-loader.gif" />
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>  
    <script type="text/javascript">
        $(document).ready(function () {
            $('#dvGridWidth').width($('#dvScreenWidth').width());
        });
    </script>

    <script type="text/javascript">
        // Popup window code
        function newPopup(url) {
            popupWindow = window.open(
		    url, 'popUpWindow', 'height=200,width=500,left=50%,top=50%,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=no')
        }
    </script>
     <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>


</asp:Content>

